function init_localstorage() {
    var width = localStorage.getItem("width"),
        height = localStorage.getItem("height");
    if (width == null) {
        width = 30;
        localStorage.setItem("width", width);
    }
    if (height == null) {
        height = 30;
        localStorage.setItem("height", height);
    }
    document.getElementById("width").value = parseInt(width);
    document.getElementById("height").value = parseInt(height);
}

function create_maze_js() {
    var width = document.getElementById("width").value,
        height = document.getElementById("height").value;

    localStorage.setItem("width", width);
    localStorage.setItem("height", height);
    create_maze(parseInt(width), parseInt(height));
}
